{extend name="layout/common_layout" /}
{block name="body"}
<!--tab标签-->
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class=""><a href="{:url('admin/type/index')}">种类管理</a></li>
        <li class="layui-this">编辑种类</li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="{:url('admin/type/update')}" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label">所属分类</label>
                    <div class="layui-input-block">
                        <select name="fid" lay-verify="required">
                            {foreach name="category_level_list" item="vo"}
                            <option value="{$vo.id}" {if condition="$type.fid==$vo.id"} selected="selected"{/if}>{neq name="vo.level" value="1"}|{php}for($i=1;$i<$vo['level'];$i++){echo ' ----';}{/php}{/neq} {$vo.name}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-block">
                        <select name="type" lay-verify="required">
                            <option value="1" {if condition="$type.type==1"} selected="selected"{/if}>大度</option>
                            <option value="2" {if condition="$type.type==2"} selected="selected"{/if}>正度</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">开数</label>
                    <div class="layui-input-block">
                        <input type="text" name="num" value="{$type.num}" required  lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">长</label>
                    <div class="layui-input-block">
                        <input type="text" name="long" value="{$type.long}" required  lay-verify="required" placeholder="" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">宽</label>
                    <div class="layui-input-block">
                        <input type="text" name="wide" value="{$type.wide}" required  lay-verify="required" class="layui-input">
                    </div>
                </div>
                <!--<div class="layui-form-item">-->
                    <!--<label class="layui-form-label">高</label>-->
                    <!--<div class="layui-input-block">-->
                        <!--<input type="text" name="height" value="{$type.height}" required    class="layui-input">-->
                    <!--</div>-->
                <!--</div>-->
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="hidden" name="id" value="{$type.id}">
                        <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="js"}
<!--<script src="__JS__/kindeditor/kindeditor.config.js"></script>-->
<!--<script src="__JS__/kindeditor/kindeditor-all-min.js"></script>-->
<script src="__JS__/ueditor/ueditor.config.js"></script>
<script src="__JS__/ueditor/ueditor.all.min.js"></script>
{/block}
{block name="script"}

{/block}